<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    html, body{
            width: 100%;
            height: 100%;
            margin: 0;
            padding: 0;
            overflow: hidden;
            background: #000000 url(./images/1.png) no-repeat center top;
            background-size: cover;
        }
    .title {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      font-weight: normal;
      color: #fff;
    }
    .title span {
      font-size: 30px;
    }
    .title input {
      font-size: 20px;
      width: 230px;
      height: 25px;
      border: 0;
      padding-left: 10px;
      outline: none;
    }
    .title .btn {
      left: 480px;
      width: 80px;
      height: 30px;
      border-radius: 5px;
      outline: none;

      border: 0;
      background-color: skyblue;
      color: #fff;
      margin-left: 20px;
    }
  </style>
</head>
<body>
  <div class="title"><span>请输入您的姓名：</span><input autofocus placeholder="请输入您的姓名" class="input" type="text"><button class="btn">点击提交</button></div>
  
  <script>
    document.querySelector('.btn').addEventListener('click', function() {
      const name = document.querySelector('.input').value
      
      localStorage.setItem('name', name)
      
      location.href = "./html/home.html"
    })
  </script>
</body>
</html>